<?php
namespace app\index\controller;
use EasyWeChat\Foundation\Application;
use think\Config;
/**
 * 前台微信公共控制器ed468e8802814cadff2264821c052a0a
 */
class Base extends \think\Controller
{
	protected $app = '';
	protected $beforeActionList = [];
	protected $options = [
	    'debug'  => true,
        'log' => [
	        'level' => 'debug',
	        'permission' => 0777,
	        'file'  => '/tmp/easywechat.log', // XXX: 绝对路径！！！！
	    ],
      	'oauth' => [
		    'scopes'   => ['snsapi_base'],
		    'callback' => '/user/callback',
		],
        'guzzle' => [
		    'timeout' => 10.0, // 超时时间（秒）
		],
	];
	public function _initialize(){
		$this->options['app_id'] = Config::get('app_id');
 		$this->options['secret'] = Config::get('secret'); 
 		$this->options['token']  = Config::get('token');
		$this->app = new Application($this->options);
		if(method_exists($this, 'init')){
			$this->init();
		}
	}
	
	
	
}
 
 

?>